//
// Created by DuJinxin on 2022/3/31.
//
#include <stdio.h>
int FiboN()
{
    int u1 =1, u2 = 2;
    int n,Fibn;
    int k,temp;

    printf("please enter the number of the fibonacci sequency:\n");
    scanf("%d",&n);

    if(n==1)
        Fibn = 1;
    else
    if(n==2)
        Fibn = 2;
    else
    {
        for(k=1;k<=n-2;k=k+1)
        {
            temp = u1 + u2;
            u1 = u2;
            u2 = temp;
        }
        Fibn = u2;
    }

    printf("The %d-th Fibo number is: %d",n,Fibn);
    return 0;
}


